package com.jsong.linuo.object;

/**
 * @Author: 黎诺
 * @CreateTime: 2025-04-29
 * @Description: clone
 */

public class Test03 {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person p2 = new Person("夜雀", 201);
        Object o = p2.clone();
        Person p3 = (Person) o;
        //比较地址值
        System.out.println(p2 == p3);
        //比较内容
        System.out.println(p2.equals(p3));
    }
}
